<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="./jquery-1.11.3.js"></script>
</head>
<body>
    <ul>
        <li>孙悟空</li>
        <li>二师兄</li>
        <li>沙师弟</li>
        <li>三藏</li>
        <li>白龙马</li>
        <li>狐狸精</li>
    </ul>
    <ul>
        <li>孙悟空</li>
        <li>二师兄</li>
        <li>沙师弟</li>
        <li>三藏</li>
        <li>白龙马</li>
        <li>狐狸精</li>
    </ul>
    <script>
        $('li:first').css('color','red');
        $('li:last').css('color','green');
        
        $('li:first-child').css('background','orange');
        $('li:last-child').css('background','pink');
        $('li:nth-child(3)').css('text-align','center');
    </script>
</body>
</html>